﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/SharedGenomics.Domain" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/SharedGenomics.Domain" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
  <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xs:complexType name="FilterParameterSetInfo">
    <xs:sequence>
      <xs:element minOccurs="0" name="CategoryFilters" nillable="true" type="tns:ArrayOfCategoryFilterInfo" />
      <xs:element minOccurs="0" name="HardyWeinbergP" nillable="true" type="xs:decimal" />
      <xs:element minOccurs="0" name="IndividualMissingnessRate" nillable="true" type="xs:decimal" />
      <xs:element minOccurs="0" name="MAF" nillable="true" type="xs:decimal" />
      <xs:element minOccurs="0" name="Phenotype" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="SnpGenotypingRate" nillable="true" type="xs:decimal" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="FilterParameterSetInfo" nillable="true" type="tns:FilterParameterSetInfo" />
  <xs:complexType name="ArrayOfCategoryFilterInfo">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="CategoryFilterInfo" nillable="true" type="tns:CategoryFilterInfo" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfCategoryFilterInfo" nillable="true" type="tns:ArrayOfCategoryFilterInfo" />
  <xs:complexType name="CategoryFilterInfo">
    <xs:sequence>
      <xs:element minOccurs="0" name="Category" nillable="true" type="xs:string" />
      <xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="FilterValues" nillable="true" type="q1:ArrayOfstring" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="CategoryFilterInfo" nillable="true" type="tns:CategoryFilterInfo" />
  <xs:complexType name="FilterJobSubmissionInfo">
    <xs:sequence>
      <xs:element minOccurs="0" name="CategoricallyFilteredIndividuals" nillable="true" type="tns:ArrayOfEntityFilterSummary" />
      <xs:element minOccurs="0" name="FileSetId" type="xs:int" />
      <xs:element minOccurs="0" name="FilterToken" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="FilterJobSubmissionInfo" nillable="true" type="tns:FilterJobSubmissionInfo" />
  <xs:complexType name="ArrayOfEntityFilterSummary">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="EntityFilterSummary" nillable="true" type="tns:EntityFilterSummary" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfEntityFilterSummary" nillable="true" type="tns:ArrayOfEntityFilterSummary" />
  <xs:complexType name="EntityFilterSummary">
    <xs:sequence>
      <xs:element minOccurs="0" name="Id" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Reason" type="tns:FilterReason" />
      <xs:element minOccurs="0" name="Value" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="EntityFilterSummary" nillable="true" type="tns:EntityFilterSummary" />
  <xs:simpleType name="FilterReason">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="LowGenotyping" />
      <xs:enumeration value="SnpMissingness" />
      <xs:enumeration value="MAF">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">4</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HardyWeinberg">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">8</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CategoricalFilter">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">16</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="FilterReason" nillable="true" type="tns:FilterReason" />
  <xs:simpleType name="JobStatus">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NotSubmitted" />
      <xs:enumeration value="Queued" />
      <xs:enumeration value="Running" />
      <xs:enumeration value="Finished" />
      <xs:enumeration value="Failed" />
      <xs:enumeration value="Cancelled" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="JobStatus" nillable="true" type="tns:JobStatus" />
  <xs:complexType name="FilterResult">
    <xs:sequence>
      <xs:element minOccurs="0" name="FilteredEntities" nillable="true" type="tns:ArrayOfEntityFilterSummary" />
      <xs:element minOccurs="0" name="RemainingIndividualCount" type="xs:int" />
      <xs:element minOccurs="0" name="RemainingSnpCount" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="FilterResult" nillable="true" type="tns:FilterResult" />
</xs:schema>